<!DOCTYPE html>
<%@page import="java.util.ArrayList"%>
<%@page import="mwa.cs.model.Reader"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../admin/authority.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<%@include file="headScriptAD.jsp"%>
<script type="text/javascript"	src="../assets/js/admin/cs83002script.js">
	
</script>
<script type="text/javascript">
$(document).ready(function() {
	  $("html,body").animate({scrollTop: 0}, 100);  
});
</script>
</head>
<body> 
<input type="hidden" id="url_address" name="url_address" value="">
<input type="hidden" id="agent_browser" name="agent_browser" value="">
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
		<!-- End SIDEMENU--> 
		
		<!-- BEGIN RIGHT DETAIL-->
		<div class="col-sm-12 col-xs-12" id="right-side">
			<div id="navigator-bar"><i class="fa fa-home"></i> หน้าหลัก <i class="fa fa-angle-right ml-5 mr-5"></i> แก้ไขข้อมูลผู้ใช้งานระบบ </div>
			<!--End navigator-bar-->
			<div >
				<div id="page-header" class="clearfix">
				<div> แก้ไขข้อมูลผู้ใช้งานระบบ  </div>
				<!-- End form-nav-->	
				</div>
				<div class="form-list clearfix" style="margin-top:-30px; margin-bottom:-75px;">
					<div class="search-box no-radius">
						<!-- header -->
						<div class="form-group clearfix search-header no-radius">
							<div class="pull-left">ระบุข้อมูลการค้นหา</div>
							<div class="pull-right"><div id="hide-button"><i class="fa fa-chevron-circle-up"></i></div></div>
						</div>
					  	<!-- SEARCH BOX-BODY -->
					  	<div id="box-body">
							<div class="form-group clearfix mt-20">
								<div class="col-sm-3 mt-4" style="margin-left: 27%;">
									<div class="pull-left mt-4">
										<label>รหัสพนักงาน</label>
										<input type="text" class="form-control" id="inputUserId" placeholder="รหัสพนักงาน">
									</div>
								</div>
								<div class="col-sm-5 mt-4">
									<div class="col-sm-9">
										<label>ชื่อ-นามสกุล</label>
								 		<input type="text" class="form-control" id="inputUserFName" placeholder="ชื่อ-นามสกุล">
									</div>
								</div>
				  			</div>
							<!-- footer -->
							<div class="form-group mt-20 clearfix search-footer no-radius">
								<div class="col-sm-12 text-center">
						 			<button type="button" class="btn btn-primary" onclick="searchUser();"><i class="fa fa-search"></i> ค้นหา</button>
									<button type="button" class="btn btn-primary" onclick="window.location.reload();"><i class="fa fa-refresh"></i> เริ่มใหม่</button>
								</div>
					  		</div>					  
					 	</div>
					 	<!-- END BOX-BODY -->
					</div>
				</div>
				<div class="form-list" style="padding:0px">
					<div class="form-list" id="form-list" >
						<form role="form" name="form" action="" method="POST">
							<div class="list-detail-area">						
								<table id="userDataTable" class="stripe hover cell-border" cellspacing="0" width="100%" align="center">
		        					<thead>
		            					<tr style="background-color: #399bca; color:white; font-size: 0.9em;">
											<th style="border-right: 1px solid #999">ลำดับ</th>
											<th style="border-right: 1px solid #999">รหัสพนักงาน</th>
											<th style="border-right: 1px solid #999; text-align: center;">ชื่อ-นามสกุล</th>
											<th style="border-right: 1px solid #999; text-align: center;">ตำแหน่ง</th>
											<th style="border-right: 1px solid #999">โทร</th>
											<th style="border-right: 1px solid #999">สถานะ</th>
											<th style="border-right: 1px solid #999">รายเละเอียด</th>
		            					</tr>
		        					</thead> 				
		    					</table>
		    					<input type="hidden" name="dataDelete" id="dataDelete"
									value="" />
							</div>
						</form>
						<form method="post" action="../admin/CS83001.jsp" id=editData >
							<input type="hidden" name="userId" id="userId" value="" >
						</form>
					</div>
					<!-- list-detail-area-->	
				</div>		
			</div>
			<!-- End detail-area -->
			
			<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดย การประปานครหลวง</div>
		</div>
		<!-- END RIGHT DETAIL--> 
		
	</div>
	<!-- End Detail-area--> 
	
</div>
<!-- End Wrapper --> 
<!-- POPUP -->
	<div class="modal fade" id="checkDataModal" tabindex="-1" role="dialog"
		aria-labelledby="failModal" aria-hidden="true">
		<div class="modal-dialog" style="width: 400px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title">ตรวจสอบข้อมูลให้ถูกต้อง</h4>
				</div>
				<div class="modal-body">
					<p><span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
					<span id="checkMessage"></span></p>
				</div>
				<div class="modal-footer" style="text-align: center;">
					<button type="button" class="btn btn-primary" onclick="getFocus();"><i class="glyphicon glyphicon-ok"></i> ตกลง</button>
				</div>
			</div>
		</div>
	</div>
<!-- END POPUP -->
	<div class="modal fade" id="confirmModal" tabindex="-1"
		role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title">ยืนยันการลบข้อมูลผู้ใช้งานระบบ</h4>
				</div>
				<div class="modal-body">
					<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
					<span id="modal_content_confirmModal"></span>
				</div>
				<div class="modal-footer">
					<button onclick="deleteData()" type="submit" class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
					<button onclick="cancel()" type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
				</div>
			</div>
		</div>
	</div>
	<div class="modal fade" id="successModal" tabindex="-1"
		role="dialog" aria-labelledby="successModal" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title">ลบข้อมูลสำเร็จ</h4>
				</div>
				<div class="modal-body">
					<span class="fa-stack fa-lg mr-10" style="color:#0C0"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-check fa-stack-1x fa-inverse"></i> </span>
					<span id="modal_content_successModal"></span>
				</div>
				<div class="modal-footer">
					<button onclick="location.reload()" type="button" class="btn btn-primary" data-dismiss="modal"><i class="glyphicon glyphicon-ok"></i> ตกลง</button>
				</div>
			</div>
		</div>
	</div>
	<div class="modal fade" id="errorModal" tabindex="-1"
		role="dialog" aria-labelledby="errorModal" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title">ข้อมูลผิดพลาด</h4>
				</div>
				<div class="modal-body">
					<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
					<span id="modal_content_errorModal"></span>
				</div>
				<div class="modal-footer">
					<button onclick="location.reload()" type="button" class="btn btn-primary" data-dismiss="modal"><i class="glyphicon glyphicon-ok"></i> ตกลง</button>
				</div>
			</div>
		</div>
	</div>
</body>
</html>